package com.xuecheng.api.course;

import com.xuecheng.framework.domain.course.CourseBase;
import com.xuecheng.framework.domain.course.response.AddCourseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;

/**
 * 课程管理Api
 */
@Api(value = "课程信息接口", tags = {"课程信息接口,提供课程信息的管理,查询接口"})
public interface CourseBaseControllerApi {
    /**
     * 添加一个课程
     * @param courseBase 课程实体类
     * @return 响应结果
     */
    @ApiOperation("添加一个课程")
    AddCourseResult addCourseBase(CourseBase courseBase, BindingResult result);
    /**
     * 根据课程id查询一个课程信息
     * @param courseId 课程id
     * @return 响应结果
     */
    @ApiOperation("根据课程id查询一个课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程id")
    })
    CourseBase getCourseBaseById(String courseId);

    /**
     * 修改课程信息
     * @param courseId  课程id
     * @param courseBase 课程实体类
     * @return 响应结果
     */
    @ApiOperation("根据课程id修改一个课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程id",name = "courseId",required = true,paramType = "path")
    })
    ResponseResult updateCoursebase(String courseId, CourseBase courseBase);
}
